from rest_framework import status
from abc import ABCMeta


class BaseStatus:
    http_code: int = None
    msg: str = None


class SuccessStatus(BaseStatus):
    http_code = status.HTTP_200_OK
    msg = "请求成功"


class BadRequestStatus(BaseStatus):
    http_code = status.HTTP_400_BAD_REQUEST
    msg = "请求参数有问题"


class ServerErrorStatus(BaseStatus):
    http_code = status.HTTP_500_INTERNAL_SERVER_ERROR
    msg = "系统内部错误"


class ForbiddenStatus(BaseStatus):
    http_code = status.HTTP_403_FORBIDDEN
    msg = "没有权限访问"


class NotFoundStatus(BaseStatus):
    http_code = status.HTTP_404_NOT_FOUND
    msg = "访问不到此资源"


class AuthenticateStatus(BaseStatus):
    http_code = status.HTTP_401_UNAUTHORIZED
    msg = "token有问题"
